package edu.ciee.tz.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class LogInterceptor {
	@Pointcut("execution(public * edu.ciee.tz.service.*.*(..))")
	public void myMethod(){};
	
	@Before("myMethod()")
	public void before() {
		System.out.println("INVOKED BY edu.ciee.tz.aop.LogInterceptor:method before");
	}
	
	
	
//	@Around("myMethod()")
//	public void aroundMethod(ProceedingJoinPoint pjp) throws Throwable {
//		System.out.println("INVOKED BY edu.ciee.tz.aop.LogInterceptor:method around start");
//		pjp.proceed();
//		System.out.println("INVOKED BY edu.ciee.tz.aop.LogInterceptor:method around end");
//	}
//	this method is UNSAFE
}
